TARGET = "dedup"
SOURCES = main.cpp posix_io.cpp filenode.cpp hash.cpp dedup.cpp run.cpp io_exceptions.cpp illegal_argument_exception.cpp
OBJECTS = $(SOURCES:%.cpp=%.o)

CFLAGS  += $(shell pkg-config --cflags libcrypto)
LDFLAGS += $(shell pkg-config --libs libcrypto)

all: $(TARGET)

$(OBJECTS): $(SOURCES)

$(TARGET): $(OBJECTS)
	$(CXX) -o $(TARGET) $(LDFLAGS) $(OBJECTS) $(LOADLIBES) $(LDLIBS)

clean: $(RM)
	$(OBJECTS) $(TARGET)

.PHONY: all clean
